package com.bjtu.laorenyouhao.laoren.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.bjtu.common.valid.group.AddGroupp;
import com.bjtu.common.valid.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 老人的健康信息
 * 
 * @author yangyalong
 * @email yangyalong@gmail.com
 * @date 2021-07-08 20:27:26
 */
@Data
@TableName("lr_health")
public class HealthEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId
	@NotNull(message = "修改时必须指定id",groups = {UpdateGroup.class})
	@Null(message = "新增不能指定id",groups = {AddGroupp.class})
	private Long id;
	/**
	 * 记录时间
	 */
	@NotNull(groups = {AddGroupp.class})
	private Date recordTime;
	/**
	 * 心情类型
	 */
	@NotNull(groups = {AddGroupp.class})
	private Integer emotionType;
	/**
	 * 健康评分
	 */
	@NotNull(groups = {UpdateGroup.class})
	private Integer healthPoint;
	/**
	 * 老人id
	 */
	@NotNull(groups = {AddGroupp.class,UpdateGroup.class})
	private Long laorenId;

}
